package com.immunology.model;

import com.immunology.model.enums.Role;

public class User {

	private int id;
	private String firstName;
	private String middleName;
	private String lastName;
	private String login;
	private String password;
	private Role role;
	private String post;
	
	public User() {
		
	}
	
	public User(String login, String password){
		this(login, password, Role.USER);
	}
	
	public User(String login, String password, Role role){
		this.login = login;
		this.password = password;
		this.role = role;
	}
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getLogin() {
		return login;
	}
	public void setLogin(String login) {
		this.login = login;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public Role getRole() {
		return role;
	}
	public void setRole(Role role) {
		this.role = role;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getMiddleName() {
		return middleName;
	}

	public void setMiddleName(String middleName) {
		this.middleName = middleName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getPost() {
		return post;
	}

	public void setPost(String post) {
		this.post = post;
	}
	
	public String getRoleAsString(){
		return role.value();
	}
	
}
